package com.example.demo.service;

import com.example.demo.dao.LeasetimeDao;
import com.example.demo.entity.LeaseTimeEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LeasetimeService {

   @Autowired
   private LeasetimeDao leasetimeDao;
    /**
     * 通过ID查询单条数据
     */
    public LeaseTimeEntity queryLeasetimeById(Integer ltid){
        return leasetimeDao.queryLeasetimeById(ltid);
    }


    /**
     * 通过实体作为筛选条件查询
     */
    public List<LeaseTimeEntity> queryLeasetimeAll(){
        return leasetimeDao.queryLeasetimeAll();
    }

    /**
     * 新增数据
     */
    public int insertLeasetime(LeaseTimeEntity leasetime){
        return leasetimeDao.insertLeasetime(leasetime);
    }

    /**
     * 修改数据
     */
    public int updateLeasetime(LeaseTimeEntity leasetime){
        return leasetimeDao.updateLeasetime(leasetime);
    }

    /**
     * 通过主键删除数据
     */
    public int deleteByIdLeasetime(Integer ltid){
        return leasetimeDao.deleteByIdLeasetime(ltid);
    }

}